import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description：练习
 * User: cjc
 * Date: 2025-02-28
 * Time: 17:20
 */
public class Test {
    //输出X图形（输入多种数据）
    public static void main(String[] args) {
        Scanner a = new Scanner(System.in);
        while (a.hasNextInt()) {
            int n = a.nextInt();
            for(int i =0;i<n;i++) {
                for(int j = 0;j<n;j++) {
                    if(i==j||i+j==n-1) {
                        System.out.print("*");
                    }else {
                        System.out.print(" ");
                    }
                }
                System.out.println("");
            }
        }
    }

    //猜数字游戏
    public static void GuessNum(String[] args) {
        Random random = new Random();
        int num = random.nextInt(100);
        System.out.println("开始猜数，1~100");
        Scanner scan = new Scanner(System.in);
        System.out.println("一共五次机会");
        int count = 5;
        while(count != 0) {
            int a = scan.nextInt();
            if(a > num) {
                System.out.println("猜大了");
            } else if(a < num) {
                System.out.println("猜小了");
            } else {
                System.out.println("恭喜猜对了");
                break;
            }
            count--;
        }
    }

    //水仙花数
    public static void Num(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        for (int j = 0; j <= num; j++) {
            int count = 0;
            int i = j;
            while(i != 0) {
                count++;
                i /= 10;
            }
            i = j;
            int sum = 0;

            while(i != 0) {
                sum +=Math.pow(i % 10,count);
                i /= 10;
            }
            if(j == sum) {
                System.out.println(j);
            }
        }
        scan.close();
    }

    //给定两个数，求这两个数的最大公约数
    public static void Max(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = a % b;
        while(c != 0) {
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
        scan.close();
    }

    //输入的方法
    public static void ShuRu(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入你的名字：");
        String name = scan.nextLine();
        System.out.println("请输入你的年龄：");
        int age = scan.nextInt();
        scan.close();
    }

    //计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值。
    public static void calc(String[] args) {
        double sum = 0;
        /*for (int i = 1; i <= 100 ; i++) {
            if(i % 2 != 0) {
                sum += 1.0/i;
            }
            if(i % 2 == 0) {
                sum -= 1.0/i;
            }
        }*/
        //优化
        int flag = 1;
        for (int i = 1; i <= 100 ; i++) {
            sum += 1.0/i * flag;
            flag = -flag;
        }
        System.out.println(sum);
    }
}
